Link Edits
ISVs are cautioned that products that compile and link edit
themselves after installation may use system interfaces that
are not defined by the ABI.
Specifically, the headers and
static libraries on the Reference Platform, not specified by
the ABI, may not be compatible with those headers and
libraries on all ABI vendors' platforms.
This problem occurs only when an ISV's application link edits
after installation (i.e., uses the
ld
command to build itself).
If all executables and shared libraries are built on the
Reference Platform and pass the Application Compliance Testing
tool (ACT), the only possible external interfaces are those specified
by the ABI. (Note that ACT does not test manifest constants, such as
ioctls compiled into the program.)
The ABI interfaces are present on all ABI conforming Operating
Systems in the form of dynamic shared libraries. Thus they will
be resolved through dynamic linking to the dynamic shared libraries
at run-time.
In the case where an application link edits itself after
installation, it may expose a incompatibility between non-ABI
headers or libraries on the Reference Platform and another
vendor's platform.
Furthermore, vendors may change the
interface or implementation of libraries not covered by the
ABI in new operating system releases.
The MIPS ABI Group offers the following guidelines to ISV's whose
applications must link edit after installation;
they are not meant to be either exhaustive or foolproof:
-
Compiler and linker flags are known to differ across the
various platforms. To aid the ISV, each vendor has
agreed to provide a consistant interface in the wrappers
abicc
and abild
, which are discussed later in this chapter.
-
The math routines in
libm.a
will be consistent across all vendor's platforms.
-
libcurses.a
is known to depend on private interfaces in
libc.so.1
and should not be used.
-
Implementations of
libucb.a
may not be compatible
across all vendor's platforms and should not be used.
-
ISV's should document the version of any system
interface used by their application that is not
supported by the ABI.
For example, applications using
X widgets, X extensions, Motif or other system
libraries which must be linked statically should
document the release level of these libraries.
This will allow customers to compare release levels between
the application and their system.
Object Files
All .o
files shipped with an ISV product must use position independent
code, as described in chapter 3 of the
System V ABI, MIPS Processor Supplement.
Debugging
Only an ELF symbol table is needed for assembly level debugging
with symbols.
Compiler and Linker Switches
The various platforms use different flags and switches for the compiler
and linker. This is a reflection of the
differences in the heritage of the compiler systems on the various
machines.
Vendors should support either the standard SVR4 SGS flags and switches
or provide a wrapper function which translates these standard switches
into the local equivalents.
The wrappers abicc
and abild
have been developed to permit
uniform compilation and loader flags. Vendors should provide these
wrappers or equivalent functions.
Some compilation systems may not support
all the flags and switches that the SVR4 SGS does. Where possible the
unsupported switches should be silently ignored by the wrapper or
the base compilation system.
The abicc
wrapper supports the following flags, which are described
in the UNIX System V Release 4 Programmer's Reference Manual:
-
-A controls #assert mechanisms
-
-B symbolic, -Bsymbolic, -B dynamic, -Bdynamic,
-B static, -Bstatic controls linking phase library name lookup
-
-C controls comment removal
-
-c supresses linking phase
-
-D controls #define mechanisms
-
-dn, -d n, -dy, -d y selects dynamic linking (-dy, -d y)
-
-E preprocess only (no compilation or linking)
-
-f (obsolete, ignored)
-
-G direct linker to produce shared object. Note that on the IRIX Reference Platform, this option is ignored. Shared object generation is controlled
by flags to the linker.
-
-g generate symbolic debug information
-
-H prints include file names as they are processed
-
-I controls include file lookup
-
-Jsfm not supported, silently ignored
-
-Kfpe, -K fpe,
-Kmau, -K mau,
-Ksd, -K sd,
-Ksz, -K sz not supported, silently ignored
-
-KPIC, -K PIC generate Position Independent Code
-
-Kminabi, -K minabi restrict libraries to ABI definitions
-
-L controls library search path at linking phase
-
-l search specified library
-
-o names output file
-
-O controls optimization
-
-P perform only preprocessing
-
-p generate profiling code
-
-Qn, -Q n,
-Qy, -Q y generates compiler identification in output
-
-q controls generation of profiling code
-
-S suppress assembly and linking (leaves assembler file)
-
-U causes specified name to be undefined
-
-V prints version information
-
-W not supported, generates a warning message
-
-Xa, -X a,
-Xc, -X c,
-Xt, -X t controls conformance to ANSI and ISO C standards
-
-Y not supported, generates a warning message
The abild
wrapper supports the following flags, which are described
in the UNIX System V Release 4 Programmer's Reference Manual:
-
-a undefined references generate errors (static mode)
-
-b controls DSO linkage
-
-dn, -d n, -dy, -d y dynamic linking (-dy)
-
-e defines entry point
-
-h controls dynamic linking name lookup
-
-l search the specified library
-
-m produce a memory map
-
-o names the output file
-
-r combine object files
-
-s strip symbolic information
-
-t supress warning about multiple defined symbols of different sizes
-
-u enters named symbol as an undefined
-
-zdefs, -z defs, -znodefs, -z nodefs, -ztext, -z text controls handling of undefined symbols
-
-Bsymbolic, -B symbolic, -Bdynamic, -B dynamic, -Bstatic, -B static controls library name lookup
-
-G produce shared object
-
-I specifies an interpreter to be linked with a.out
-
-L controls library lookup path
-
-M use specified map file
-
-Qn, -Q n, -Qy, -Q y add compiler identification strings to output
-
-V output a version identifier string
-
-Y controls library search list
Back to the Table of Contents
Back to the MIPS ABI Home Page
Maintained by webmaster@mipsabi.org
last modified on August 17, 1995
Copyright © 1995, MIPS ABI Group, Incorporated.